/* 
	该文件专门用于暴露一个store对象，整个应用只有一个store对象
*/

//引入createStore，专门用于创建redux中最为核心的store对象
import { createStore } from 'redux'
import { persistStore, persistReducer } from 'redux-persist'
import storage from 'redux-persist/lib/storage'  // 默认为 web 的 localStorage
//引入为allnumReducer组件服务的reducer
import allnumReducer from './allnum_reducer'


const persistConfig = {
	key: 'root',
	storage
}

const persistedReducer = persistReducer(persistConfig, allnumReducer)
let store = createStore(persistedReducer)
let persistor = persistStore(store)

export { store, persistor } 
